
** PCA 
pca st_successimp st_admireimp st_richimp st_respectimp 
alpha st_successimp st_admireimp st_richimp st_respectimp 
screeplot 
biplot st_successimp st_admireimp st_richimp  st_respectimp 

** EFA 
factor st_successimp st_admireimp st_richimp  st_respectimp 
alpha st_successimp st_admireimp st_richimp  st_respectimp, item

** CFA 
factor st_successimp st_admireimp st_richimp  st_respectimp , factors (1) 
sem (Maspolcult ->  st_success st_admireimp st_richimp st_respect)
estat gof, stats(all)

******************* Creating index of masculine political culture *******************
*************************************************************************************

* Generate masculine index 
gen index_mas = (((successimp + admireimp + richimp + respectimp) - 4) / (4*5)) * 100
sum index_mas
scalar min_val = r(min)
scalar max_val = r(max)
gen index_mas_scaled = 0 + (index_mas - min_val) / (max_val - min_val) * 100
* or width(5) freq 
alpha successimp admireimp richimp respectim, item 

** Standardising masculine political culture index: 
sum index_mas_scaled  
gen st_index_mas_scaled = (index_mas_scaled -52.03541)/20.67349
sum st_index_mas_scaled

******************* Aggregating masculine political culture index to level 2 ********
*************************************************************************************
egen index_mas_level2 = mean(index_mas_scaled), by(cntry)
** standardizing:
sum index_mas_level2
gen st_index_mas_level2 = (index_mas_level2  -52.03347)/8.036776
sum st_index_mas_level2

********************** Summary statistics ****************************
**********************************************************************
graph dot (mean) index_mas_level2, over(cntry, sort(index_mas_level2)) title("Average Masculine Culture by Country") ylabel(0(5)100)
	




	
	
	
	
	

	


	




	

